public class demo1 {


    public static void main(String[] args) throws InterruptedException {

        Thread thread = new Thread(()->{
            for (int i = 0; i < 1000; i++) {
                System.out.println("正在执行 thread 线程");
            }
        });

        thread.start();
        thread.join();
        System.out.println("执行 main 线程");

    }
}
